#include <stdio.h>

int main() 
{
    int seconds;
    seconds > 0;
    seconds < 100000000;
    scanf("%d",&seconds);

    printf("%d %d %d",seconds/3600,(seconds%3600)/60,(seconds%3600)%60);
    return 0;
}